home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Disc to the Future 2
/
Disc to the Future Part II Programmer's Reference (Wayzata Technology)(6013)(1992).bin
/
MAC
/
THINKC
/
4_0
/
VIVIDUS
/
QD3D.SIT
/
qd3d
/
geometry.h
< prev
next >
Wrap
Text File
|
1991-10-09
|
1KB
|
42 lines
/* ======================================================================
This header file is Copyright 1991 by Vividus Consulting.
This is not public domain source code. You may not copy and
paste from this source code. Read your Vividus Licensing
agreement for details and other restrictions.
Note: At present, these routines are only supported as needed by
hedra.
====================================================================== */
#ifndef _geometry_
#define _geometry_
typedef struct {
vector b; // Origin of ray.
vector m; // Direction of ray.
} Ray;
typedef struct {
vector center; // Ellipsoid center.
vector dimensions; // Ellipsoid dimensions.
} Ellipsoid;
typedef struct {
vector pt; // Point on plane.
vector normal; // Normal of plane.
} Plane;
typedef struct {
vector max; // Point in 1st octant direction.
vector min; // Point in opposite octant direction.
} Bound3dBox;
Boolean PtInPoly(vector *pt, int n, vector verts[], vector *norm);
Boolean RayXPlane(Ray *r, Plane *p, double *t, vector *pt);
int RayXEllipsoid(Ray *r, Ellipsoid *e, double *t);
void EllipsoidFromBox(Bound3dBox *bb, Ellipsoid *e);
#endif _geometry_